from scapy import *

TFTP_OPCODES = {
	"rrq": 		1,
	"wrq":		2,
	"data":		3,
	"ack":		4,
	"error":	5
}

class TFTP(Packet):
	name = "TFTP"
	fields_desc = [	ShortEnumField("opcode", 1, TFTP_OPCODES) ]

def tftp_file(ip_dst, file):
	pdu = IP(dst=ip_dst)/UDP(dport=UDP_SERVICES{"tftp"})/TFTP(opcode="rrq")
	
if __name__ == '__main__':
	conf.iface = "en1"
	print conf
	tftp = TFTP(opcode="rrq")
	tftp.hwdst = "FF:FF:FF:FF:FF:FF"
	ans = send(UDP(dport=69)/tftp, iface="en1")
	print ans	